package com.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author White
 * @version 1.0
 * @email 616769721@qq.com
 * @date 2021/7/20 20:45
 */
public class MatcherUtil {
    public static boolean match(String regex, String str) {
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}
